var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
    })(t, e);
}, function(t, e) {
    function n() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, 
    new n());
}), a = this && this.__decorate || function(t, e, o, n) {
    var r, i = arguments.length, c = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) c = Reflect.decorate(t, e, o, n); else for (var s = t.length - 1; 0 <= s; s--) (r = t[s]) && (c = (i < 3 ? r(c) : 3 < i ? r(e, o, c) : r(e, o)) || c);
    return 3 < i && c && Object.defineProperty(e, o, c), c;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("GameData"), s = e("AudioManager"), c = cc._decorator, l = c.ccclass, d = c.property, u = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.label = null, t.skeleton = null, t.time = 0, t;
    }
    return i(t, e), t.prototype.start = function() {}, t.prototype.init = function(t) {
        this.time = t, this.node.active = !0, this.skeleton.setAnimation(0, "animation", !0);
        var e = 0;
        this.skeleton.setEventListener(function() {
            r.GD.isEffect && e < 3 && (e++, s.default.getInstance().playAudio("填弹音效", .3));
        }), this.refresh();
    }, t.prototype.refresh = function() {
        this.label.string = this.time.toFixed(1) + "s";
    }, t.prototype.update = function(t) {
        0 < this.time ? (this.time -= t, this.refresh()) : this.node.active = !1;
    }, a([ d(cc.Label) ], t.prototype, "label", void 0), a([ d(sp.Skeleton) ], t.prototype, "skeleton", void 0), 
    a([ l ], t);
}(cc.Component);

n.default = u;